<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
    <title>导航栏</title>
    <style>
        ul {
            list-style: none;
            height: 30px;
            line-height: 30px;
        }
        
        li {
            float: left;
            margin: auto 30px;
        }
        
        .item {
            font-family: 微软雅黑;
            font-size: 16px;
            font-weight: 600px;
        }
        
        .separator:not(:last-child) {
            width: 1px;
            height: 16px;
            background: #999;
            margin: 7px auto;
        }
        
        a {
            text-decoration: none;
            color: rgb(24, 220, 102);
            display: block;
        }
        
        a:hover {
            background: rgb(99, 121, 93);
        }
    </style>
</head>

<body>
    <div id="box">
        <ul>
            <template v-for="menu in menulist">
                <li class="item"><a href="#">{{menu}}</a></li>
                <li class="separator"></li>
            </template>
        </ul>
    </div>
    <script>
        new Vue({
            el: '#box',
            data: {
                menulist: ['首页', '闪购', '生鲜 ', '团购', '全球购']
            }
        });
    </script>
</body>

</html>